package com.app.service;

import com.app.bean.dto.User;
import com.app.config.FeignLogConfig;
import com.app.fallback.UserHystrixFallback;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * @autor xiaoyu.fang
 * @date 2019/12/12 11:17
 */
@FeignClient(value = "app-service-sys", configuration = FeignLogConfig.class, fallback = UserHystrixFallback.class)
public interface IUserFeignService {

    /**
     * 获取用户信息
     *
     * @return
     */
    @GetMapping("/sys/user/{id}/detail")
    User getUserById(@PathVariable("id") String id);
}
